home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / termsorc.lha / Extras / Source / gtlayout-source.lha / LTP_AdjustMenuPosition.c < prev    next >
C/C++ Source or Header  |  1995-09-24  |  641b  |  29 lines

  1. /*  GadTools layout toolkit
  2. **
  3. **  Copyright © 1993-1995 by Olaf `Olsen' Barthel
  4. **  Freely distributable.
  5. **
  6. **  :ts=4
  7. */
  8.  
  9. #include "gtlayout_global.h"
  10.  
  11. #ifdef DO_MENUS
  12.  
  13.     /* AdjustMenuPosition(RootMenu *Root):
  14.      *
  15.      *    Calculate the effective positions of the menus
  16.      *    and submenus.
  17.      */
  18.  
  19. VOID __regargs
  20. LTP_AdjustMenuPosition(RootMenu *Root)
  21. {
  22.     MenuNode *Menu;
  23.  
  24.     for(Menu = (MenuNode *)Root -> MenuList . mlh_Head ; Menu -> Node . mln_Succ ; Menu = (MenuNode *)Menu -> Node . mln_Succ)
  25.         Menu -> Width = LTP_AdjustItemPosition(Menu -> Menu . FirstItem,Menu -> Menu . LeftEdge + 4,Root -> Screen -> BarHeight + 1);
  26. }
  27.  
  28. #endif    /* DO_MENUS */
  29.